# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=attr
pkgver=2.5.2
pkgrel=2
pkgdesc="utilities for managing filesystem extended attributes"
options="checkroot !check" # attr.test fails with no error message
url="https://savannah.nongnu.org/projects/attr"
arch="all"
license="LGPL-2.1-or-later"
checkdepends="perl"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc lib$pkgname:libs"
source="https://download.savannah.nongnu.org/releases/attr/attr-$pkgver.tar.gz
	attr-basename.patch"

build() {
	./configure \
		--build="$CBUILD" \
		--host="$CHOST" \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-nls
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

dev() {
	license="LGPL-2.1-or-later"
	default_dev
}

libs() {
	license="LGPL-2.1-or-later"
	default_libs
}

sha512sums="
7b8f210ab2233d82d282d36c10ac2f4b10e1ba9bd0f02e1f4e69b8f610cb3266bfac9796349b51b2f92fa6ef2c66c62f1a9c4ae18e202b00af3e251e3b469a24  attr-2.5.2.tar.gz
f64a2a4319d61011ba6a72437c47fc1809dfe7254f54376d38c35481176767a91d3fe68727a8b7b316f0825a68be1459b20f3f2ecfd5cb9a3b3a56701182248f  attr-basename.patch
"
